package dao.impl;

import java.sql.SQLException;
import java.util.List;

import com.ibatis.sqlmap.client.SqlMapClient;

import module.BasicArea;
import dao.ABSBasicDAO;
import domain.vo.queryObject;

/**
 * 
* @ClassName: BasicAreaDAOImpl
* @Description: BasicAreaDAOImpl
* @author chenchao
* @date 2013-10-30 上午01:13:01
*
 */
public class BasicAreaDAOImpl  extends ABSBasicDAO<BasicArea>{

	/**
	 * 构造方法
	 * @param sqlMapClient
	 */
	public BasicAreaDAOImpl(SqlMapClient sqlMapClient) {
		super(sqlMapClient);
	}
	/* (non-Javadoc)
	 * @see dao.ABSBasicDAO#getAll()
	 */
	@Override
	public List<BasicArea> getAll() throws SQLException {
		// TODO Auto-generated method stub
		return sqlMapClient.queryForList("BasicArea.getAll");
	}

	/* (non-Javadoc)
	 * @see dao.ABSBasicDAO#getById(java.lang.String)
	 */
	@Override
	public BasicArea getById(String id) throws SQLException {
		// TODO Auto-generated method stub
		return (BasicArea)sqlMapClient.queryForObject("BasicArea.getById", id);
	}

	/* (non-Javadoc)
	 * @see dao.ABSBasicDAO#getByPK()
	 */
	@Override
	public BasicArea getByPK() {
		return null;
	}

	/* (non-Javadoc)
	 * @see dao.ABSBasicDAO#insertT(java.lang.Object)
	 */
	@Override
	public void insertT(BasicArea t) throws SQLException {
		sqlMapClient.insert("BasicArea.insertBasicAreaInfo", t);
	}

	/* (non-Javadoc)
	 * @see dao.ABSBasicDAO#updateT(java.lang.Object)
	 */
	@Override
	public void updateT(BasicArea t) throws SQLException {
		sqlMapClient.update("BasicArea.updateBasicAreaInfo", t);
	}

	/* (non-Javadoc)
	 * @see dao.ABSBasicDAO#countByQueryObject(domain.vo.queryObject)
	 */
	@Override
	public int countByQueryObject(queryObject queryObject) throws SQLException {

		return (Integer)sqlMapClient.queryForObject("BasicArea.countByQueryObject", queryObject);
	}
	/* (non-Javadoc)
	 * @see dao.ABSBasicDAO#getObjectByQueryObject(domain.vo.queryObject)
	 */
	@Override
	public List<BasicArea> getObjectByQueryObject(queryObject queryObject)
			throws SQLException {
		return sqlMapClient.queryForList("BasicArea.getObjectByQueryObject", queryObject);
	}
	

}
